export default Tab

function Tab(el, option) 
{
    this.el = document.querySelector(el)
    this.Start()
}

Tab.prototype.Start = function () 
{
    this.Over()
}

Tab.prototype.Over = function () 
{
    let ulli = this.el.querySelectorAll('ul li')
    ulli.forEach((item, i) =>
    {
        item.onmouseover = () => 
        {
            this.el.querySelector('ul li.active').className = ''
            item.className = 'active'
            this.Neir(i)
        }
        Tab.prototype.Neir = function (i) 
        {

            this.el.querySelector('ol li.active').className = ''
            this.el.querySelector(`ol li:nth-of-type(${i+1})`).className = 'active'

        }
    });
}